package com.lei.view.sys;

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;

import javax.swing.JPanel;

import com.lei.factory.configmgr.ComponentNames;
import com.lei.factory.configmgr.ConfigmgrUIFactory;
import com.lei.ife.BaseInterface;
import com.lei.view.account.AccountMgr;
import com.lei.view.bill.BillManager;
import com.lei.view.bill.BusinManager;
import com.lei.view.bill.ImageManager;
import com.lei.view.configmgr.ParamMgr;
import com.lei.view.configmgr.SQLSetPanel;
import com.lei.view.configmgr.SYSSetPanel;
import com.lei.view.otherfunctions.ExcelOperation;
import com.lei.view.weather.WeatherContent;

public class CenterPanel extends JPanel  implements BaseInterface{

	private static final long serialVersionUID = 1L;
	private CardLayout card;

	public CenterPanel() {
		initImage();
		initFrame();
		initAssembly();
		addActionListenner();
		this.updateUI();
	}

	private void initImage() {
		
	}

	private void initFrame() {
		card = new CardLayout();
		this.setPreferredSize(new Dimension(1030,800));
		this.setOpaque(false);
		this.setLayout(card);
	}

	private void initAssembly() {
		   this.add( new WeatherContent(),"index");
		   this.add(new BillManager(),"billManager");
		   this.add(new BusinManager(),"businManager");
		   this.add(new ImageManager(),"ImageManager");
		   this.add(new AccountMgr(),"accountManager");
		   this.add((SQLSetPanel)ConfigmgrUIFactory.getComponentForClassName(ComponentNames.SQLSETPANEL),"sqlMgr");
		   this.add((SYSSetPanel)ConfigmgrUIFactory.getComponentForClassName(ComponentNames.SYSSETPANEL),"sysMgr");
		   this.add(new ExcelOperation(),"exceloperation");
		   this.add(new ParamMgr(),"paramMgr");
	}

	private void addActionListenner() {
		
	}

	@Override
	public void Listenner(String listenner) {
	}

	@Override
	public void ActionName(String name) {
		card.show(this, name);
	}

	@Override
	public void reObject(Object obj) {
		
	}
}
